 /**
 * Description: 系统权限实体
 * Copyright:Copyright 2018 nfky.com. All rights reserved
 * @author:xk
 * @since:0.0.1
 * Create at:2018-01-10 下午 19:40:18
 *  
 * Modification History:
 * Date         Author      Version     Description
 * ------------------------------------------------------------------
 * 2018-01-10   xk       0.0.1     Initial
 */
package com.metro.paperless.sys.beans.entity;

import com.metro.core.user.BasePermission;
import com.metro.paperless.sys.beans.vo.SysRoleMenu;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

import org.apache.commons.lang3.StringUtils;

 /**
 * 系统权限实体<br>
 *
 * @author xk
 * @since [0.0.1]
 * @version [0.0.1, 2018-01-10]
 */
@Data()
@EqualsAndHashCode(callSuper = false)
public class SysPermissionEntity extends BasePermission {
    private static final long serialVersionUID=1L;
    //父权限ID 每一层2位来表示如：101010
    private Long parentId;
    //子系统编码
    private String subsysCode;
    //权限类型 MENU:菜单 OPERATE:操作
    private String permissionType;
    //权限编码
    private String permissionCode;
    //权限名称
    private String permissionName;
    //连接地址
    private String action;
    //层级
    private Integer permissionLevel;
    //是否是叶子节点 1.是 0.不是
    private boolean leaf;
    //排序号
    private Integer sortNum;
    //图标
    private String icon;
    //是否显示 1.显示 0.不显示
    private String display;
    //备注
    private String remark;
     // 对应角色数组
     private String[] roleIdArr;
     // 角色权限列表
     private List<SysRoleMenu> roleMenuList;
     //权限
     private String rights;

     @Override
     public String getRights() {
         return StringUtils.isBlank(this.rights) ? "*":rights;
     }
 }
